import dataService from '../../services/dataService.js'

Page({
  data: {
    pointsRecords: [],
    totalPoints: 0
  },
  onLoad() {
    this.getPointsRecords()
  },
  // 获取积分记录
  getPointsRecords() {
    var that = this;
    dataService.getPointsHistory().then(resp => {
      console.log('results:', resp);
      that.setData({pointsRecords: resp.data});
    })
  }
})
